package week9.Q1;

public class Fish extends Animal{
    private double weight;

    public Fish(double weight,int age){
        super(age);
        this.weight=weight;
    }


    public void setWeight(double weight){
        this.weight=weight;
    }

    public double getWeight() {
        return weight;
    }

    @Override
    public void showInfo() {
        super.showInfo();
        System.out.println("我是一只"+getWeight()+"的鱼!"+"我今年"+getAge()+"了！");
    }
}
